package com.ztgf.shopping.service.shop;

import com.ztgf.shopping.models.bo.shop.ShopSpecificationCategoryRelationSaveBO;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.ztgf.shopping.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ztgf.shopping.mapper.shop.ShopSpecificationCategoryRelationMapper;
import com.ztgf.shopping.models.service.shop.IShopSpecificationCategoryRelationService;
import com.ztgf.shopping.models.dto.shop.ShopSpecificationCategoryRelationDTO;

/**
 * 店铺品牌分类规格关系表控制器
 *
 * @author zhanghualang
 * @Date 2020-05-28 15:40:39
 */
@DubboService
public class ShopSpecificationCategoryRelationServiceImpl extends ServiceImpl<ShopSpecificationCategoryRelationMapper, ShopSpecificationCategoryRelationDTO> implements IShopSpecificationCategoryRelationService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(ShopSpecificationCategoryRelationSaveBO saveBO) {
        ShopSpecificationCategoryRelationDTO dto = new ShopSpecificationCategoryRelationDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
